<template>
	<view class="hot_shop">
		<view class="title">
			推荐商品
		</view>
		<view class="goods_list">
			<view class="goods_item" v-for="item in goods" :key="item.id">
				<image :src="item.img_url" mode=""></image>
				<view class="price">
					<text>￥{{item.sell_price}}</text>
					<text>￥{{item.market_price}}</text>
				</view>
				<view class="goods_name">
					{{item.title}}
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		props:['goods'],
		methods: {

		}
	}
</script>

<style lang="scss">
	.hot_shop {
		margin-top: 5px;
		background-color: #eee;

		.title {
			height: 80rpx;
			line-height: 80rpx;
			text-align: center;
			color: $uni-color-background;
			background-color: #FFFFFF;
			margin: 5px 0;
		}

		.goods_list {
			margin: 0 15rpx;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;

			.goods_item {
				background-color: #FFFFFF;
				width: 355rpx;
				margin: 10rpx 0;
				padding: 15rpx;
				box-sizing: border-box;

				image {
					width: 80%;
					height: 150px;
					display: block;
					margin: 0 auto;
				}

				.price {
					color: #f40;
					font-size: 32rpx;
					font-weight: bold;
					margin: 20rpx 0 0 5rpx;

					text:nth-child(2) {
						font-size: 25rpx;
						margin-left: 15rpx;
						text-decoration: line-through;
						color: #ccc;
					}
				}

				.goods_name {
					font-size: 28rpx;
					line-height: 50rpx;
					padding-bottom: 15rpx;
					padding-top: 10rpx;
				}
			}
		}
		}
	

	.hot_shop::after,
	.hot_shop::before {
		content: '';
		width: 0;
		display: block;
		height: 0;
		overflow: hidden;
		clear: both;
	}
</style>
